<?php 
if (!defined("MCTDESIGN")) die("# ");

global $dir_tpl, $tb_fix, $temp, $anyDB; 
$temp->assign('base_path',$dir_tpl);

// tour trong nước
$sql = "select * from ".$tb_fix."_tour_menu where tme_root_id = 2 order by tme_order ASC";
$q = $anyDB->query($sql);
$trongnuoc = $anyDB->getAll($q);
$temp->assign('trongnuoc',$trongnuoc);
//diem khoi hanh
$sql = "SELECT * FROM ".$tb_fix."_tour_khoihanh ORDER BY tkh_order ASC";
$q = $anyDB->query($sql);
$row = $anyDB->getAll();
$temp->assign("diemkhoihanh",$row);
// tour nuoc ngoài
$sql = "select * from ".$tb_fix."_tour_menu where tme_root_id = 1 order by tme_order ASC";
$q = $anyDB->query($sql);
$arr = $anyDB->getAll($q);
$temp->assign('nuocngoai',$arr);

// HIEN THI FORM TIM KIEM KHI DANG TIM KIEM
$mct = isset($_GET["mct"]) ? m_htmlchars(stripslashes(urldecode($_GET["mct"]))) : "home";
list($mct, $act)=explode(".",$mct); 
$temp->assign('act',$act);
// LAY LINK HIEN TAI
if(isset($_GET['mct']) && $_GET['mct'] == "search.searchTour"){
    $link[0] = (int)$_GET['rootId'];
    $link[1] = (int)$_GET['cat1'];
    $link[2] = (int)$_GET['cat2'];
    $temp->assign('linkid',$link);
}
$temp->display("$dir_tpl/blocks/trong_timkiem/index.mct"); 
?> 
